package com.sunshine.security;

import com.sunshine.bean.User;
import com.sunshine.exception.HashRegisteredUserException;
import com.sunshine.exception.InvalidUserException;
import com.sunshine.exception.PasswordIncorrectException;

import java.util.Optional;

/**
 * Created by along on 4/19/18.
 */
public interface AuthService {
    Optional<JwtUser> register(User user) throws InvalidUserException, HashRegisteredUserException, PasswordIncorrectException;

    Optional<JwtUser> login(User user) throws InvalidUserException, PasswordIncorrectException;
}
